package cn.com.dev;


import cn.com.elite.Util;
import cn.com.kh.AESUtil;
import cn.com.kh.FileHttpUtils;
import cn.com.kh.KHUtil;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import java.net.URLEncoder;
import java.util.UUID;

/**
 * @Title: cn.com.dev-DevTao
 * @Description:ngsapitask-yngd 系统API接口开发Demo，重点关注业务逻辑部分
 * @Author: lijun
 * @Date 2022-04-06 14:21
 */

public class DevTao {
    private static final Log log = LogFactory.getLog(DevTao.class);

    public static void main(String[] args) throws Exception {

        String downNGSPath = "3H_WoAttac/20230405190516-SIFS7A-深城管2023字第93462号.jpg";

        try {
            if (downNGSPath.startsWith("3H_WoAttac/")) {
                downNGSPath = "3H_WoAttac/" + URLEncoder.encode(downNGSPath.replace("3H_WoAttac/", ""), "UTF-8");
            } else {
                downNGSPath = URLEncoder.encode(downNGSPath, "UTF-8");
            }
        } catch (Exception e) {
            log.warn("将上传文件下载地址做URLEncoder处理异常", e);
        }
        System.out.println(downNGSPath);
        System.out.println("http://119.136.19.75:8010/ngs/fs/get?file=" + downNGSPath);

    }

}
